package net.zdsoft.wpchat.support.entity;

import java.util.Date;

/**
 * 权限群组实体类
 *
 * @author xuan
 */
public class AuthGroup {
	//群组类型
	public static final int SYSTEM_TYPE = 1;//系统
    public static final int SYSTEM_SPECIAL_TYPE = 2;//系统特殊
    public static final int USER_DEFINE_TYPE = 10;//用户自定义

    private String id;
    private String name;
    private String description;
    private Date modifiedTime;
    private Date creationTime;
    private int type;

    /**
     * 判断是否是系统类型的群组
     *
     * @return
     */
    public boolean isSystem() {
        return SYSTEM_TYPE == type;
    }

    /**
     * 判断是否是系统特殊类型的群组
     *
     * @return
     */
    public boolean isSystemSpecial() {
        return SYSTEM_SPECIAL_TYPE == type;
    }

    /**
     * 系统自定义类型的群组
     *
     * @return
     */
    public boolean isUserDefined() {
        return USER_DEFINE_TYPE == type;
    }

    /**
     * 获取系统类型描述
     *
     * @return
     */
    public String getTypeName() {
        switch (type) {
        case SYSTEM_TYPE:
            return "系统";
        case SYSTEM_SPECIAL_TYPE:
            return "系统特殊";
        default:
            return "自定义";
        }
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

}
